package com.soulless.lambda;

/**
 * <p>
 *
 * </p>
 *
 * @author zenglei
 * @date 2022/04/29/ 19:10
 */
public class LambdaTest {

    public static void main(String[] args) {
        LambdaTest lambdaTest = new LambdaTest();
        int operate = lambdaTest.operate(1, 2, (a, b) -> {
            return a + b;
        });
        System.out.println("lambdaTest: " + operate);
    }

    private int operate(int a, int b, FunctionSoulless mathOperation) {
        return mathOperation.operation(a, b);
    }

}

@FunctionalInterface
interface FunctionSoulless {

    int operation(int a, int b);

    default void test() {

    }

}